﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="True"
    CodeBehind="VoterReport.aspx.cs" Inherits="Votations.NSurvey.WebAdmin.VoterReport" %>

<%@ Import Namespace="Votations.NSurvey.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentLinkAction" runat="server">
    <span class="action-span"><a href="ResultsReporting.aspx?SurveyID=<%=SurveyId %>">
        <%=GetPageResource("GraphicResultsReportHyperlink") %></a> | <a href="FieldReporting.aspx?SurveyID=<%=SurveyId %>">
            <%=GetPageResource("TextFieldsResultsReportHyperlink") %></a> | <a href="ResultsCrossTabulation.aspx?SurveyID=<%=SurveyId %>">
                <%=GetPageResource("CrossTabResultsReportHyperlink") %></a>| <a href="ExportData.aspx?SurveyID=<%=SurveyId %>">
                    <%=GetPageResource("ExportDataHyperlink") %></a> </span>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentTitle" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentMain" runat="server">
    <table class="TableLayoutContainer" cellspacing="0" cellpadding="0">
        <tr>
            <td class="contentCell" valign="top">
                <asp:Label ID="MessageLabel" runat="server" Visible="False" ForeColor="Green"></asp:Label>
                <table class="Innertext">
                    <tr>
                        <td colspan="2">
                            <font class="Titlefont">
                                <asp:Literal ID="VoterInformationTitle" runat="server" EnableViewState="False">Voter 
            information</asp:Literal></font>
                            <br>
                            <img src="images/Linebreak.Gif">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;&nbsp;
                        </td>
                        <td>
                            <table class="Innertext">
                                <tr>
                                    <td width="160">
                                        <strong>
                                            <asp:Literal ID="VoterDBIDLabel" runat="server" EnableViewState="False">Voter DB ID :</asp:Literal></strong>
                                    </td>
                                    <td>
                                        <asp:Label ID="VoterUIDLabel" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="160">
                                        <strong>
                                            <asp:Literal ID="VoterUserNameLabel" runat="server" EnableViewState="False">Voter user name :</asp:Literal></strong>
                                    </td>
                                    <td>
                                        <asp:Label ID="VoterUserName" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="160">
                                        <strong>
                                            <asp:Literal ID="VoterEmailLabel" runat="server" EnableViewState="False">Voter Email :</asp:Literal></strong>
                                    </td>
                                    <td>
                                        <asp:Label ID="VoterEmail" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="160">
                                        <strong>
                                            <asp:Literal ID="VoterIPAddressLabel" runat="server" EnableViewState="False">IP 
                  address :</asp:Literal></strong>
                                    </td>
                                    <td>
                                        <asp:Label ID="IPAddressLabel" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="160">
                                        <strong>
                                            <asp:Literal ID="VoteRecordedLabel" runat="server" EnableViewState="False">Vote recorded on 
                  :</asp:Literal></strong>
                                    </td>
                                    <td>
                                        <asp:Label ID="VoteDateLabel" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" width="160">
                                        <strong>
                                            <asp:Literal ID="TimeToTakeLabel" runat="server" EnableViewState="False">Time to take the survey 
                  :</asp:Literal></strong>
                                    </td>
                                    <td>
                                        <asp:Label ID="TimeToTakeSurveyLabel" runat="server"></asp:Label>&nbsp;<br>
                                        <br>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <br />
                <asp:PlaceHolder ID="AddInVoterDataPlaceHolder" runat="server"></asp:PlaceHolder>
                <br />
                <table class="Innertext">
                    <tr>
                        <td colspan="2">
                            <font class="Titlefont">
                                <asp:Literal ID="SurveyAnswersTitle" runat="server" EnableViewState="False">Survey 
            answers</asp:Literal></font> -
                            <asp:LinkButton ID="EditAnswersLinkButton" runat="server" OnClick="EditAnswersLinkButton_Click">Edit voter's answers</asp:LinkButton><br />
                            <img src="images/Linebreak.Gif">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;&nbsp;
                        </td>
                        <td>
                            <table class="Innertext">
                                <tr>
                                    <td>
                                        <asp:DataGrid class="Innertext" ID="QuestionsDataGrid" runat="server" CellPadding="0"
                                            BorderWidth="0px" GridLines="Horizontal" ShowHeader="False" border="0" AutoGenerateColumns="False"
                                            CellSpacing="6" Width="100%">
                                            <Columns>
                                                <asp:TemplateColumn>
                                                    <ItemTemplate>
                                                        <b>
                                                            <%#Server.HtmlEncode(System.Text.RegularExpressions.Regex.Replace(new Votations.NSurvey.Helpers.PipeManager().PipeValuesInText(int.Parse(DataBinder.Eval(Container.DataItem,"QuestionId").ToString()),DataBinder.Eval(Container.DataItem,"questionText").ToString(), _voterAnswers.VotersAnswers), "<[^>]*>", " "))%></b><br>
                                                        <asp:PlaceHolder ID="matrixplaceholder" runat="server" />
                                                        <asp:DataGrid ID="QuestionAnswersDataGrid" Class="Innertext" runat="server" CellSpacing="1"
                                                            CellPadding="2" Border="0" AutoGenerateColumns="False" ShowHeader="False">
                                                            <Columns>
                                                                <asp:TemplateColumn>
                                                                    <ItemStyle Width="10px" Font-Size="xx-small" VerticalAlign="Top"></ItemStyle>
                                                                </asp:TemplateColumn>
                                                                <asp:TemplateColumn>
                                                                    <ItemTemplate>
                                                                        <itemstyle font-size="xx-small" verticalalign="Top">
				</itemstyle>
                                                                        <%#Server.HtmlEncode(System.Text.RegularExpressions.Regex.Replace(new PipeManager().PipeValuesInText(int.Parse(DataBinder.Eval(Container.DataItem,"QuestionId").ToString()),DataBinder.Eval(Container.DataItem,"AnswerText").ToString(), _voterAnswers.VotersAnswers), "<[^>]*>", " "))%>
                                                                    </ItemTemplate>
                                                                </asp:TemplateColumn>
                                                            </Columns>
                                                        </asp:DataGrid>
                                                        <b>
                                                            <asp:Label ID="QuestionScoreLabel" runat="server" /></b>
                                                        <br>
                                                        <hr width="90%">
                                                    </ItemTemplate>
                                                </asp:TemplateColumn>
                                            </Columns>
                                        </asp:DataGrid><b><asp:Label ID="VoterScoreTotalLabel" runat="server" /></b>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
